<?php
date_default_timezone_set('Asia/Shanghai');
require_once '../Config.php';
$con = mysql_connect ( host, username, password );
if (! $con) {
	die ( 'Could not connect: ' . mysql_error () );
}
mysql_select_db ( db, $con );
$arr = array();
$sql = "set names utf8";
mysql_query($sql);
$sql = "select * from j_tab_usetime";
$result = mysql_query($sql);
if(empty($result)){
	$json = json_encode($arr);
	echo $json;
}else{
	if($row=mysql_fetch_array($result)){
		$createTime = $row['createTime'];
		$canUseDay = $row['canUseDay'];
		$enable = $row['enable'];
	}
	mysql_close($con);
	if($enable == 0){
		echo "true";
		return;
	}
	$shixiaotime = date("Y-m-d H:m:s", strtotime("$canUseDay day $createTime"));
	if(strtotime(date("Y-m-d H:i:s")) > strtotime($shixiaotime)){
		echo "false";
	}else{
		echo "true";
	}
}
?>